package com.harmony.pilot.agent.model;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Message {
    private MessageRole role;
    private String content;
    private LocalDateTime timestamp;
    private Object metadata;
    
    public static Message user(String content) {
        return Message.builder()
            .role(MessageRole.USER)
            .content(content)
            .timestamp(LocalDateTime.now())
            .build();
    }
    
    public static Message assistant(String content) {
        return Message.builder()
            .role(MessageRole.ASSISTANT)
            .content(content)
            .timestamp(LocalDateTime.now())
            .build();
    }
    
    public static Message system(String content) {
        return Message.builder()
            .role(MessageRole.SYSTEM)
            .content(content)
            .timestamp(LocalDateTime.now())
            .build();
    }
    
    public enum MessageRole {
        USER, ASSISTANT, SYSTEM
    }
}

